package com.forevershine.business.service.impl;

import java.util.List;

import com.forevershine.business.model.Task;
import com.forevershine.business.persistent.TaskDao;
import com.forevershine.business.service.AbstractService;

public class TaskServiceImpl extends AbstractService<Integer, TaskDao> {

	public void loadTasksByUserId(Integer userId, Object result) {
		List<Task> list = daoModel.loadTaskList(this.mySqlAccessor, userId);
		if (result instanceof List) {
			((List) result).addAll(list);
		}
	}
	
	public void insertTask(Task task)
	{
		daoModel.insertTask(this.mySqlAccessor, task).getTaskId();
	}

}
